package com.hzhq.contract.bean.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;


/**
 * @author hzhq
 * @create 2021/3/17 11:38 上午
 * @email hzhq1255@163.com
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "role")
@ApiModel("角色信息PO")
public class Role {

    @Id
    private ObjectId roleId;
    @ApiModelProperty(value = "角色编号")
    @Field("role_code")
    private Integer roleCode;
    @ApiModelProperty(value = "角色名字")
    @Indexed
    @Field("role_name")
    private String roleName;
    @ApiModelProperty(value = "删除标志 0 未删除 1 删除")
    @Field("deleted")
    private Integer deleted;


}
